package com.xinqi.modules.databank.v2.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xinqi.common.green.annotation.Text;
import com.xinqi.common.mybatis.data.entity.BaseEntity;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 课程资料库主表实体层
 *
 * @author: system
 * @date: 2023/03/14
 */
@Setter
@Getter
@TableName("co_course_resource")
public class CourseResourceEntity extends BaseEntity {
    /** 标题 */
    @Text
    @TableField(value = "title")
    @NotNull(message = "标题非空")
    private String title;
    /** 内容类型1互动课件2资料6互动视频*/
    @TableField(value = "content_type")
    private Integer contentType;
    /** 详情内容 */
    @Text
    @TableField(value = "content")
    private String content;
    /** 附件 */
    @TableField(value = "fileurls")
    private String fileurls;
    /** 视频j集合 */
    @TableField(value = "videos")
    private String videos;
    /** 图片集合 */
    @TableField(value = "images")
    private String images;
    /** 班级ID */
    @TableField(value = "class_id")
    @NotNull(message = "班级id非空")
    private Long classId;
    /** 用户id */
    @TableField(value = "user_id")
    private Long userId;
    /**章节Id*/
    @TableField(value = "chapter_id")
    private Long chapterId;
    /** 是否同步发布到班级 0否 1是 */
    @TableField(value = "synchro")
    private Integer synchro;
    /** 同步的班级ID集合 */
    @TableField(value = "class_ids")
    private String classIds;
    /** 允许下载 */
    @TableField(value = "download")
    private Integer download;
    /** 下载次数 */
    @TableField(value = "donwload_num")
    private Integer downloadNum;
    /** 允许拖拽(0不允许,1允许) */
    @TableField(value = "allow_drag")
    private Integer allowDrag;
    /** 允许视频倍速(0否1是) */
    @TableField(value = "allow_speedup")
    private Integer allowSpeedup;
    /** 是否显示得分 */
    @TableField(value = "is_studeescore")
    private Integer isStudeescore;
    /** 是否立即发布，0否  1是 */
    @TableField(value = "now_release")
    private Integer nowRelease;
    /** 定时发布，0不定时 1定时 */
    @TableField(value = "timing")
    private Integer timing;
    /** 发布时间 */
    @TableField(value = "release_time")
    private LocalDateTime releaseTime;
    /** 截止时间(各种类型结束时间) */
    @TableField(value = "end_time")
    private LocalDateTime endTime;
    /** 发布状态 1未发布 2定时发布 3已发布 4已结束 5已开始 */
    @TableField(value = "status")
    private Integer status;
    /** 额外字段 */
    @TableField(value = "extra")
    private String extra;
    /** 互动环节/切片发布状态0未发布，1已发布 */
    @TableField(value = "part_release_status")
    private Integer partReleaseStatus;
    /**
     * 备课区互动课件Id
     */
    @TableField(exist = false)
    private Long prepareInteravtiveCourseId;

}
